1. Field of the Invention
The present invention relates to a data processing system, a device, a secondary storage device, and a recording medium storing a program, and in particular, relates to the scheduling of input and output commands issued in a secondary storage device from the data processing device.
This application is based on Japanese Patent Application No. Hei 10-165542, the contents of which are incorporated herein by reference.
2. Background Art Including Information Disclosed Under 37 CFR 1.97 and 1.98
Data exchange from an initiator comprising a host computer to a target comprising a secondary storage device is conducted by means of I/O (Input/Output) commands. There are I/O command execution methods in the initiator in which, after one I/O command has ended, the next I/O command is issued; however, for example, in the standard called SCSI (Small Computer System Interface)-2, prior to the completion of one I/O command, the next I/O command may be issued.
FIG. 9 shows the format of I/O commands in a first conventional example in the case in which a plurality of I/O commands are made simultaneously issuable. As shown in the figure, each of the I/O commands 801-808 incorporate a target number (T_ID), an initiator number (I_ID), a command code, an address, a transmission length, and in addition, tags 809-816, which serve to distinguish the I/O commands.
The tags 809-816 within the I/O commands 801-808 are attached in the initiator which issues the I/O commands by means of the method shown in the flowchart in FIG. 10.
When read/write requests are made by application programs on the initiator, then a determination is made in the initiator as to whether there are I/O commands which are to be simultaneously issued with respect to the same target (this indicates that the I/O commands are issued and the execution thereof is not yet completed) (step S701).
Here, when a determination has been made that there are I/O commands which are to be simultaneously issued, then the initiator attaches, to an I/O command which is to be issued in response to a read/write request, a tag having a number obtained by adding xe2x80x9c1xe2x80x9d to the value of the tag of the I/O command which was immediately previously issued with respect to the same target (step S702). On the other hand, when a determination has been made that there are no I/O commands which are to be simultaneously issued, a value of xe2x80x9c0xe2x80x9d is attached to the I/O command to be issued as a tag (step S703).
Then, when a tag is attached in this manner, the processing of the flowchart shown in FIG. 10 is ended, and the initiator creates and issues the I/O commands having the format shown in FIG. 9 in accordance with the tags attached. Here, when the reading and writing unit of the data in the target is 16 KB, when a 64 KB read request is made by the application program on the initiator, as shown in FIG. 11, in the device driver which issues the I/O commands, four 16 KB read I/O commands having the tags xe2x80x9c00xe2x80x9d-xe2x80x9c03xe2x80x9d attached thereto are issued.
Further, Japanese Patent Application, First Publication No. Hei 8-272688 discloses a cache memory device which simply stores hierarchical items and cache tags in a single cache array structure.
Furthermore, as a second conventional example, in the case in which a plurality of I/O commands are made simultaneously issuable, the technology disclosed in Japanese Patent Application, First Publication No. Hei 9-190293 is known. In this technology, attention is drawn to the fact that, among the I/O commands issued by the initiator, there are commands having a high degree of urgency and those having a low degree of urgency, and the initiator attaches to each I/O command a xe2x80x9csurplus timexe2x80x9d which functions as a time gap until the execution of the I/O command which is issued.
Next, in the target in which these I/O commands have been received, a xe2x80x9cdeadline surplus time (point in time)xe2x80x9d obtained by adding the xe2x80x9csurplus timexe2x80x9d in the I/O command to the present point in time calculated by a timer within the target is calculated, and the I/O commands are issued in order from those having the earliest deadline surplus time.
However, in recent years, structures have been adopted in which the disk devices which serve as the targets of a number of initiators are held in common using interfaces such as Fibre Channels or the like. When such a structure is employed, in the first conventional example described above, even if a series of I/O commands (hereinbelow referred to as an I/O command group) are issued by a single initiator in order to read out a continuous region of a disk, the I/O commands which arrive from a plurality of initiators become confused in the target, and this creates a problem in that wasteful seek operations are generated.
In other words, as shown in FIG. 12, when three I/O commands (indicated in the figure by the cross-hatched rectangles, the white rectangles, and the black rectangles) arrive essentially simultaneously at a disk device 1004 which serves as a target from three hosts 1001-1003 which serve as initiators via interface 1005, the I/O commands which arrive are stored in a queue in a form in which the I/O commands arriving from hosts 1001-1003 are mixed up, as shown in the lower right of FIG. 12. In such a case, even if the I/O commands for accessing a continuous region of a disk are issued by hosts 1001-1003, the order of processing thereof in disk device 1004 becomes confused. For this reason, problems are present in that wasteful seek operations are generated, and the execution efficiency of the I/O commands becomes extremely poor.
In order to avoid such problems, the method shown in FIG. 13, termed xe2x80x9celevator seekingxe2x80x9d, is known. Here, when a head 1105 moving in the direction indicated by the arrow is above a region 1102 of disk 1101, and a series of I/O commands for accessing the continuous regions 1102, 1103, and 1104 arrive in response to a single read/write request in an application program, then the regions 1103, 1104, and 1102 on disk 1101 are accessed. Here, when regions 1103 or 1104 are accessed, if a command for accessing a region to the inside of region 1104 arrives, then this region is accessed first, and this is undesirable. Accordingly, a considerable amount of time is required until region 1102 is accessed, and the transmission of the completion of the read/write to the application program becomes significantly delayed.
Furthermore, in the second conventional example described above, even if the same xe2x80x9csurplus timexe2x80x9d is attached to each I/O command within an I/O command group in the initiator, xe2x80x9cdeadline surplus timesxe2x80x9d are attached in the target in accordance with the time at which each I/O command was actually received. For example, even if I/O command groups for accessing respective continuous regions are issued from initiators having the same initiator number, and these are received by the target in the order shown in the upper table of FIG. 14, when the xe2x80x9cdeadline surplus timesxe2x80x9d are attached as shown in the figure, the target executes the I/O commands in the order shown in the lower table of FIG. 14. For this reason, the order of access of the regions on the disk becomes confused, wasteful seek operations are generated, and the execution efficiency of the I/O commands becomes extremely poor.
The present invention was created in order to solve the problems present in the conventional technology described above, and has as an object thereof to provide a data processing system, a device, a secondary storage device, and a recording medium for recording programs which are capable of efficiently executing a plurality of input and output commands.
In order to attain the above object, a data processing system in accordance with a first view of the present invention is provided with a data processing device which issues input and output commands, and a secondary storage device which is connected to the data processing device via signal lines and which conducts data exchange with the data processing device in accordance with the input and output commands.
The data processing device is provided with: a first tag attachment device for attaching a first tag which is identical with respect to a series of input and output commands for accessing a continuous region of the secondary storage device, among the input and output commands to be issued in response to input and output requests from a host, and which differs from input and other output commands simultaneously executed, a second tag attachment device for attaching a second tag for identifying respective input and output commands to which the same first tag is attached by means of the first tag attachment device, an input and output command generating device for generating input and output commands having first and second tags attached thereto by the first and second tag attachment device, and an input and output command transmitting device for transmitting input and output commands generated by the input and output command generating device to the secondary storage device via the signal lines.
The secondary storage device is provided with: an input and output command receiving device for receiving input and output commands transmitted by the input and output command transmitting device, via the signal lines, an input and output command storage device for storing input and output commands received by the input and output command receiving device, an input and output command arrangement device for arranging input and output commands in accordance with the first and second tags attached to the input and output commands and storing these in the input and output command storage device, and an input and output command executing device for executing, in order, input and output commands arranged by the input and output command arrangement device and stored in the input and output command storage device.
In accordance with the data processing system described above, the tags added to the input and output commands are separated into first tags and second tags, and moreover, the same first tag is attached to a series of input and output commands corresponding to a single input and output request. Accordingly, in the secondary storage device, the input and output commands are arranged so that the commands having the same first tag are continuous, and furthermore, the series of input and output commands are arranged in order by means of the second tags, and thereby, it is possible for the input and output command execution device to efficiently execute the input and output commands.
In the data processing system described above, what is meant by input and output commands is not necessarily commands in which both input and output are present, so that for example, an input command from a read-only memory device would be included.
In order to attain the above object, in the data processing system described above, the data processing device may be further provided with a surplus time appending device for appending surplus time until the execution of the input and output command to each input and output command generated by the input and output command generating device. In such a case, the secondary storage device may be further provided with a timing device for timing points in time, and a deadline surplus time generating device for generating, based on surplus time appended to each input and output command received by the input and output command receiving device and points in time measured by the timing device, a deadline surplus time which serves as the execution deadline for each input and output command, by means of the input and output command executing device, and the input and output command arrangement device may furthermore be set to arrange the input and output commands in accordance with the deadline surplus time generated by the deadline surplus time generating device and to store these in the input and output command storage device.
By means of this, a series of input and output commands corresponding to a single input and output request can be efficiently executed in a continuous manner, and it is also possible to exercise deadline control in units of series of input and output commands.
In the data processing system above, a plurality of the data processing devices may exist. In such a case, the first tag attachment device of each data processing device attaches a first tag containing identification data for identifying the plurality of data processing devices.
In order to attain the above object, a data processing device in accordance with a second view of the present invention comprises a data processing device constructed so as to be connectable via signal lines with a secondary storage device and executing input and output commands in order in accordance with tags attached thereto, wherein are provided: a first tag attachment device for attaching a first tag which is identical with respect to a series of input and output commands for accessing a continuous region of the secondary storage device, among the input and output commands to be issued in response to input and output requests from a host, and which differs from input and other output commands simultaneously executed, a second tag attachment device for attaching a second tag for identifying respective input and output commands to which the same first tag is attached by means of the first tag attachment device, an input and output command generating device for generating input and output commands having first and second tags attached thereto by the first and second tag attachment device, and an input and output command transmitting device for transmitting input and output commands generated by the input and output command generating device to the secondary storage device via the signal lines.
In accordance with the data processing device described above, the tags attached to the input and output commands are separated into first tags and second tags, and moreover, the same first tag is attached to a series of input and output commands corresponding to a single input and output request. Accordingly, in the secondary storage device which is connected with the data processing device described above, by managing the input and output commands in accordance with the first and second tags attached by the data processing device described above, it is possible to efficiently execute the input and output commands.
In the data processing device described above, the first tag attachment device may be such as to attach a first tag containing identification data for identification with respect to other data processing devices.
In the data processing device described above, the second tag attachment device may be such as to attach a second tag having a value corresponding to the order of issue of the input and output commands by means of an input and output command issue device.
In order to attain the above object, a secondary storage device in accordance with a third view of the present invention is provided with: an input and output command receiving device for receiving input and output commands having attached thereto a first tag which is identical with respect to a series of input and output commands accessing a continuous region and which differ from other input and output commands simultaneously executed, and second tags for identification of input and output commands having identical first tags, an input and output command storage device for respective input and output commands received by the input and output command receiving device, an input and output command arrangement device for arranging the input and output commands in accordance with the first and second tags attached to the input and output commands, and storing these in the input and output command storage device, and an input and output command execution device for executing, in order, input and output commands arranged by the input and output command arrangement device and stored in the input and output command storage device.
In the secondary storage device described above, for example, by arranging the input and output commands so that the commands having the same first tag are continuous, and then by further arranging a series of input and output commands in order of the second tags, the input and output command execution device can efficiently execute the input and output commands.
In the secondary storage device described above, the input and output command arrangement device may be provided with a device for determining whether an input and output command having the same first tag as an input and output command received by the input and output command receiving device is stored in the input and output command storage device, and a device for storing the input and output command received by the input and output command receiving device together with input and output commands having the same first tag previously stored in the input and output command storage device, when a determination has been made that an input and output command having the same first tag is stored.
In the secondary storage device described above, for example, the second tags appended to the input and output commands may have values corresponding to an order of issue of the input and output commands by means of an input and output command issue device. In such a case, the input and output command arrangement device may be provided with: a device for determining whether the input and output command is the first among a series of input and output commands to which the same first input and output command is appended, in accordance with the second tags, and a device for, when the device described above determines that this is a first input and output command, storing the input and output command received by the input and output command receiving device at the final end of the input and output commands stored in the input and output command storage device.
In the secondary storage device described above, surplus time until input and output commands received by the input and output command receiving device are executed may be added to the input and output commands. In such a case, the secondary storage device may be further provided with a timing device for timing points in time, and a deadline surplus time generating device for generating, based on surplus time appended to each input and output command received by the input and output command receiving device and points in time measured by the timing device, a deadline surplus time which serves as the execution deadline for each input and output command, by means of the input and output command executing device, and the input and output command arrangement device furthermore may be such as to arrange the input and output commands in accordance with the deadline surplus time generated by the deadline surplus time generating device and to store these in the input and output command storage device.
In the case of such a structure, the deadline surplus time generating device may be provided with a device for determining whether an input and output command having the same first tag as each input and output command received by the input and output command receiving device is stored in the input and output command storage device, and a device for, when the device described above determines that an input and output command having the same tag is stored, generating a deadline surplus time having the same tag stored in the input and output command storage device, as the deadline surplus time of each input and output command.
By means of this, it is possible to efficiently and continuously execute a series of input and output commands corresponding to a single input and output request, and it is possible to conduct deadline control using as units series of input and output commands.
In order to attain the above object, a computer-readable recording medium in accordance with a fourth view of the present invention records a program which realizes: a first tag attachment step for attaching a first tag which differs from other simultaneously executed input and output commands and which is identical with respect to a series of input and output commands which access a continuous region of a secondary storage device and are input and output commands which are to be issued in response to input and output requests from a host, and a second tag attachment step for attaching a second tag for identifying respective Input and output commands to which the same first tag is attached in the first tag attachment step.